Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full Review #5

Open
wants to merge 33 commits into
base: umang-review
Choose a base branch
from
Open

Full Review #5

wants to merge 33 commits into from

Conversation

bitfield
Copy link
Collaborator

A full review of the entire repository. When this PR is complete, be sure to manually merge its head branch into the main branch for this repository.

Copy link
Collaborator Author

@bitfield bitfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really great! I just made a few suggestions for tweaking the names of functions at a couple of points.

(Comments from me and @vanjara)

@@ -0,0 +1,56 @@
![Go](https://github.com/qba73/meteo/workflows/Go/badge.svg)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These badges look nice!


# meteo

Meteo is a Go client library for the weather and meteorological forecast from [Yr](https://www.yr.no/en).
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great README! Maybe move the example up to the top, so it's the first thing users see?

meteo.go Outdated Show resolved Hide resolved
meteo.go Show resolved Hide resolved
}
c, err := NewNorwayClient(resolver)
if err != nil {
fmt.Fprintln(os.Stderr, err)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Printing to standard error makes sense!

meteo.go Outdated Show resolved Hide resolved
norway_test.go Outdated Show resolved Hide resolved

func TestCreateNewMeteoClient(t *testing.T) {
t.Parallel()
var c *meteo.NorwayClient
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a neat way to show the reader what NewNorwayClient returns.

norway_test.go Show resolved Hide resolved
t.Parallel()
mux := http.NewServeMux()

mux.HandleFunc("/weatherapi/locationforecast/2.0/compact", func(rw http.ResponseWriter, r *http.Request) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like this is testing a lot in one test!

A simpler test fixture might be easier to understand and there's less danger of bugs in the fixture.

qba73 and others added 4 commits November 11, 2021 04:35
Co-authored-by: John Arundel <[email protected]>
Co-authored-by: John Arundel <[email protected]>
Co-authored-by: John Arundel <[email protected]>
Co-authored-by: John Arundel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants